<!--
 * @Author: “ljk” “2396923396@qq.com”
 * @Date: 2023-12-11 18:24:23
 * @LastEditors: “ljk” “2396923396@qq.com”
 * @LastEditTime: 2023-12-12 15:55:10
 * @FilePath: \myvue\src\App.vue
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<script setup>
import { RouterLink, RouterView } from 'vue-router'
// import HelloWorld from './components/HelloWorld.vue'
</script>

<template>
  <header>
    <img alt="Vue logo" class="logo" src="@/assets/logo.svg" width="125" height="125" />
    <div class="wrapper">
      <!-- <HelloWorld msg="You did it!" /> -->
      <nav>
        <RouterLink to="/">首页</RouterLink>
        <RouterLink to="/about">Trees</RouterLink>

      </nav>
    </div>
  </header>
  <RouterView />
</template>

<style scoped>
nav {
  height: 100%;
  width: 50%;
  display: flex;

  font-size: 12px;
  text-align: center;
  margin-top: 2rem;
}
header {
  line-height: 1.5;
  max-height: 100vh;
}

.logo {
  display: block;
  margin: 0 auto 2rem;
}



nav a.router-link-exact-active {
  color: var(--vt-text-2);
}

nav a.router-link-exact-active:hover {
  background-color: transparent;
}

nav a {
  display: inline-block;
  padding: 0 1rem;
  border-left: 1px solid var(--color-border);
}

nav a:first-of-type {
  border: 0;
}

@media (min-width: 1024px) {
  header {
    display: flex;
    padding-right: calc(var(--section-gap) / 2);
  }

  .logo {
    margin: 0 2rem 0 0;
  }

  header .wrapper {
    display: flex;
    place-items: flex-start;
    flex-wrap: nowrap;
    width: 100%;
  }

  nav {
    display: flex;
  flex-direction: column;
    text-align: left;
    margin-left: -1rem;
    font-size: 1rem;
    padding: 1rem 0;
    margin-top: 1rem;
  }
}
</style>
